<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <title>玉灵 QQ:7031633 Email:webrx@126.com</title>
    <script>
        function check() {
            //账号
            let a = document.querySelector('#username')
            if (a.value.trim() === '') {
                //alert('账号必须填写')
                let err = document.querySelector('#uerr')
                err.style.color = 'red'
                err.innerHTML = '请填写账号'
                setTimeout(() => {
                    err.innerHTML = ''
                    a.value = ''
                }, 3500)
                a.focus()
                return false
            }


            return true
        }
    </script>
</head>

<body>
<form action="/login" method="post" onsubmit="return check()">
    <label>&nbsp;&nbsp;&nbsp;账号：<input autofocus id="username" name="username" type="text"><span id="uerr"></span></label><br>
    <label>&nbsp;&nbsp;&nbsp;密码：<input id="userpassword" name="userpassword" type="password"></label><br>
    <label>验证码：<input id="checkcode" name="checkcode" type="text"></label><br>
    <hr>
    <input type="submit" value="登录">

</form>
</body>
</html>
